package dataprovider;

import model.Customer;

import org.apache.wicket.markup.html.form.IChoiceRenderer;

public class CustomerChoiceRender implements IChoiceRenderer {
	
	private static final long serialVersionUID = 1L;
	
	public Object getDisplayValue(Object object) {
		Customer customer = (Customer) object;
		StringBuilder sb = new StringBuilder();
		sb.append(customer.getFirstName());
		sb.append(" ");
		sb.append(customer.getLastName());
		return sb.toString();
	}

	public String getIdValue(Object obj, int arg1) {
		Customer customer = (Customer) obj;
		return String.valueOf(customer.getId());
	}
	

}
